//
//  YKHeaderView.m
//  HMPersonalDoctor
//
//  Created by 叶文凯 on 16/9/8.
//  Copyright © 2016年 geduo. All rights reserved.
//

#import "YKHeaderView.h"
#import "SDCycleScrollView.h"

@implementation YKHeaderView
{
    NSArray *_imagelist;
}

 - (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self loadData];
        [self setupUI];
    }
    
    return self;
}

- (void)setupUI
{
//    self.backgroundColor = [UIColor blueColor];
    
    SDCycleScrollView *cycleView = [SDCycleScrollView cycleScrollViewWithFrame:self.bounds imageNamesGroup:_imagelist];
    
    [self addSubview:cycleView];
    
}

- (void)loadData
{
    _imagelist = @[@"t0.jpg",
                   @"t1.jpg",
                   @"t2.jpg",
                   @"t3.jpg",
                   ];
    
}

@end
